Skip to content

CAMEL-23590: camel-milo - align Exchange header constant names with Camel naming convention#23474

Open
oscerd wants to merge 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23590
Open

CAMEL-23590: camel-milo - align Exchange header constant names with Camel naming convention#23474
oscerd wants to merge 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23590

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 22, 2026

Summary

Renames the MiloConstants.HEADER_AWAIT header string value from await
which sits outside the Camel namespace and is therefore not filtered by
the default HeaderFilterStrategy — to CamelMiloAwait, following the
convention used across the rest of the Camel component catalog and matching the
pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail),
CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira).

Constant Previous value New value
MiloConstants.HEADER_AWAIT await CamelMiloAwait

HEADER_AWAIT controls whether milo-client writes are awaited. The Java
field name is unchanged so routes referencing the constant symbolically
continue to work; routes using the literal string value must be updated
(documented in the 4.21 upgrade guide).

Already-compliant constants left unchanged

MiloConstants.HEADER_NODE_IDS was already Camel-prefixed (CamelMiloNodeIds).

Test changes

WriteClientTest and CallClientTest set the header by its literal value
"await"; both are updated to "CamelMiloAwait".

Generated artifacts

  • components/camel-milo/.../milo-client.json + catalog mirror
  • dsl/camel-endpointdsl/.../MiloClientEndpointBuilderFactory.java — DSL header
    accessor renamed (await()miloAwait())

Backports

  • camel-4.18.x: camel-milo exists with the same legacy value (await) —
    backport applies and will be filed as a follow-up PR.
  • camel-4.14.x: camel-milo does not exist on that branch (the component
    was removed and later reinstated) — no backport.

Test plan

  • mvn test in components/camel-milo — 41 tests pass (1 skipped)
  • Module + catalog + endpointdsl built cleanly; only camel-milo regen
    artifacts included
  • The two literal-header tests updated to the new value
  • Upgrade guide entry added under === camel-milo

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd requested review from gnodet and orpiske May 22, 2026 10:36
Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good — the rename is consistent with the Camel naming convention, the constant value is properly updated, the generated artifacts (catalog JSON, endpoint DSL) are regenerated, tests are updated, and the upgrade guide entry is thorough and well-placed.

One issue: the component documentation still uses the old literal header value.

components/camel-milo/src/main/docs/milo-client-component.adoc, line 139:

    .setHeader("await", constant(true)) // await: parameter "defaultAwaitWrites"

This example should be updated to use "CamelMiloAwait":

    .setHeader("CamelMiloAwait", constant(true)) // await: parameter "defaultAwaitWrites"

The doc page is user-facing and will actively mislead people who try to follow the example after upgrading.

Minor (non-blocking): the two test methods (WriteClientTest.sendValue and CallClientTest.doCall) use the literal string "CamelMiloAwait" rather than the MiloConstants.HEADER_AWAIT constant. Using the constant would be more resilient to future renames, but this is a pre-existing pattern and not something introduced by this PR — just worth noting.

Claude Code on behalf of Guillaume Nodet

@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-milo
  • docs
  • dsl/camel-endpointdsl
All tested modules (10 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: Milo
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

…amel naming convention

Renames the MiloConstants.HEADER_AWAIT header string value from "await" (which
is outside the Camel namespace and therefore not filtered by the default
HeaderFilterStrategy) to "CamelMiloAwait", following the convention used across
the rest of the Camel component catalog and matching the pattern established in
CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461
(camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira).

The Java field name is unchanged so routes referencing the constant
symbolically continue to work; routes using the literal string value must be
updated (documented in the 4.21 upgrade guide). MiloConstants.HEADER_NODE_IDS
was already Camel-prefixed (CamelMiloNodeIds) and is unchanged.

Updates the two tests (WriteClientTest, CallClientTest) that set the header by
its literal value. The generated Endpoint DSL header accessor await() on
MiloClientHeaderNameBuilder has been renamed to miloAwait().

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd force-pushed the fix/CAMEL-23590 branch from 52f44dc to 075f786 Compare May 22, 2026 16:46
@gnodet
Copy link
Copy Markdown
Contributor

gnodet commented May 22, 2026

The doc example at components/camel-milo/src/main/docs/milo-client-component.adoc line 139 still uses the old "await" literal:

.setHeader("await", constant(true))

This should be updated to "CamelMiloAwait" (or preferably use the constant MiloConstants.HEADER_AWAIT).

Claude Code on behalf of Guillaume Nodet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants